home *** CD-ROM | disk | FTP | other *** search
- /* */
- address 'Imagine.1'
-
- displayrexxptr on
-
- call addlib('rexxmathlib.library',0,-30,0)
- /* call addlib('rexxreqtools.library',0,-30,0) <---relevant later? */
-
- /* static constant */
- pi = 3.14159
-
-
- /* user variables */
- numturn = 3 /* Number of 360 deg. turns for spiral */
- rdius = 25 /* radius of spiral */
- turnZ = 150 /* vertical space between loops/turn (space between loops) */
-
- /* precalcs */
- qturnZ = turnZ / 4 /* increment for each axis position */
- xrot = ATAN( qturnZ * 0.75 / rdius ) * 180 / pi /* figure angle-up of axis */
-
-
- do i=0 to (4 * numturn)
-
- addaxis
- pick
-
- attrib.objectname = 'SP.'i
-
- x = rdius * cos(pi * i / 2)
- y = rdius * sin(pi * i / 2)
- z= qturnz * i
- angle = 90 * i
-
- TRANSFORM_POSITION x y z
- TRANSFORM_ALIGNMENT xrot 0 angle
-
- setattributes objectname
-
- end
- /* This is irrelevant since the "makepath"
- uses the first axis as the path:
- addaxis
- */
- unpick all
- groupmode
-
- /* make the path */
-
- multipickon
- do i = 0 to (4 * numturn)
- pick 'SP.'i
- end
- multipickoff
-
- makepath
-
- /* reset origin axis to center and correct alignment */
- TRANSFORMA_POSITION 0 0 0
- TRANSFORMA_ALIGNMENT 0 0 0
-
-
- displayrexxptr off
- exit
-